package com.christian.thread.api;

/**
 * 文件描述：线程中的sleep()方法
 *
 * @Author：wang
 * @Date：2020-04-20 14:02:29
 */
@SuppressWarnings("all")
public class SleepCase {

    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            try {
                //线程睡眠1秒
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            System.out.println("线程正在运行");
        });

        thread.start();
    }
}
